// app/controller/post.js
module.exports = app => {
  return class PostController extends app.Controller {
    async index() {
      const posts = await app.elasticsearch.search({
        index: 'estest' });
      this.ctx.body = posts;
    }
  };
};
